package cn.exrick.xboot.modules.transport.service.impl;

import cn.exrick.xboot.modules.transport.mapper.UserAddressBookMapper;
import cn.exrick.xboot.modules.transport.entity.UserAddressBook;
import cn.exrick.xboot.modules.transport.param.QueryUserAddressBookParam;
import cn.exrick.xboot.modules.transport.service.UserAddressBookService;
import cn.exrick.xboot.modules.transport.vo.UserAddressBookVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户地址簿表接口实现
 * @author gj
 */
@Slf4j
@Service
@Transactional
public class UserAddressBookServiceImpl extends ServiceImpl<UserAddressBookMapper, UserAddressBook> implements UserAddressBookService {

    @Autowired
    private UserAddressBookMapper userAddressBookMapper;

    @Override
    public UserAddressBookVo getUserAddressById(Long id) {
        return userAddressBookMapper.getUserAddressById(id);
    }

    @Override
    public IPage<UserAddressBookVo> getByCondition(Page page, QueryUserAddressBookParam param) {
        return userAddressBookMapper.getByCondition(page,param);
    }
}